package com.vhall.component.controller.rbac.adm;

import com.vhall.component.entity.rbac.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * 修改从rabc调用
 *
 * @author longzhen.gong
 * @date 2021/6/9 17:29
 */
@FeignClient(name = "RbacAdminMenuFacade", contextId = "account-admin-menu",
        path = "/v4/rbac/admin/menu")
public interface RbacAdminMenuFacade {

    /**
     * 列表
     *
     * @param reqVo 参数
     * @return 返回值
     */
    @GetMapping("/list")
    List<AdminMenuListRspVo> menuList(@Validated AdminMenuListReqVo reqVo);


    /**
     * 菜单-添加
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-添加")
    @PostMapping(value = "/add")
    MenuesVO add(@Validated MenuAddReqVO reqVO);

    /**
     * 菜单-删除
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-删除")
    @PostMapping(value = "/delete")
    List<Integer> delete(@Validated MenuDeleteReqVO reqVO);

    /**
     * 菜单-编辑
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-编辑")
    @PostMapping(value = "/edit")
    Boolean edit(@Validated MenuEditReqVO reqVO);

    /**
     * 菜单-排序
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-排序")
    @PostMapping(value = "/set-sort")
    Boolean setSort(@Validated SetSortReqVO reqVO);

    /**
     * 菜单-更新状态
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-更新状态")
    @PostMapping(value = "/change-status")
    Boolean changeStatus(@Validated ChangeStatusReqVO reqVO);

    /**
     * 菜单-添加子菜单
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("菜单-添加子菜单")
    @PostMapping(value = "/add-menu")
    MenuesVO addChildMenu(@Validated MenuAddReqVO reqVO);
}
